import QtQuick 2.12
import QtQuick.Window 2.12

Window {
    visible: true
    width: 640
    height: 480
    title: qsTr("Hello World")

    Item{
        id: root
        anchors.fill: parent

        //常量赋值
        property int number: parent.width

        onNumberChanged: {
            console.log("number",number)
        }

    }

}
